﻿using System;
using Unity.Netcode;
using UnityEngine;

[Serializable]
public class ImproveDamageEffect : IPropEffect
{
    public int num=1;

    public void OnUse(Knight knight)
    {
        if(knight!=null)
        {
            knight.Damage+=num;
        }
        else
        {
            Debug.LogError("target don't contain Knight");
        }
    }
}

[CreateAssetMenu(fileName = "ImproveDamageProp", menuName = "SO/Prop/ImproveDamageProp")]
public class ImproveDamageProp : PropData
{
    protected override void Reset()
    {
        Effect ??= new ImproveDamageEffect();
    }
}